<div id="comment_common" class="item_comment_common">
    Đánh giá trung bình: <?php echo $product->avg_rating ?><br/>
    <p>Dựa trên <?php echo $product->count_rating ?> đánh giá</p>

</div>
<ul id="comment_process" class="item_comment_common">
    <li>
        <?php $star = $product->countStar(5) ?>
        <div class="number_star">
            5 sao
        </div>
        <div class="progress">
            <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="<?php echo ($star / $product->count_rating) * 100 ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo ($star / $product->count_rating) * 100 ?>%">

            </div>
        </div> 
        <div class="count_star"><?php echo $star ?></div>
        <br class="clearBoth"/>
    </li>
    <li>
        <?php $star = $product->countStar(4) ?>
        <div class="number_star">
            4 sao
        </div>
        <div class="progress">
            <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="<?php echo ($star / $product->count_rating) * 100 ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo ($star / $product->count_rating) * 100 ?>%">
                <span class="sr-only">40% Complete (success)</span>
            </div>
        </div>
        <div class="count_star"><?php echo $star ?></div>
        <br class="clearBoth"/>
    </li>
    <li>
        <?php $star = $product->countStar(3) ?>
        <div class="number_star">
            3 sao
        </div>
        <div class="progress">
            <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="40" aria-valuemin="<?php echo ($star / $product->count_rating) * 100 ?>" aria-valuemax="100" style="width: <?php echo ($star / $product->count_rating) * 100 ?>%">
                <span class="sr-only">40% Complete (success)</span>
            </div>
        </div>
        <div class="count_star"><?php echo $star ?></div>
        <br class="clearBoth"/>
    </li>
    <li>
        <?php $star = $product->countStar(2) ?>
        <div class="number_star">
            2 sao
        </div>
        <div class="progress">
            <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="<?php echo ($star / $product->count_rating) * 100 ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo ($star / $product->count_rating) * 100 ?>%">

            </div>
        </div>
        <div class="count_star"><?php echo $star ?></div>
        <br class="clearBoth"/>
    </li>
    <li>
        <?php $star = $product->countStar(1) ?>
        <div class="number_star">
            1 sao
        </div>
        <div class="progress">
            <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="40" aria-valuemin="<?php echo ($star / $product->count_rating) * 100 ?>" aria-valuemax="100" style="width: <?php echo ($star / $product->count_rating) * 100 ?>%">

            </div>
        </div>
        <div class="count_star"><?php echo $star ?></div>
        <br class="clearBoth"/>
    </li>
</ul>